ExamPlay Light Logo
เข้าสู่ระบบ

Computer Science for IGCSE & O level - Databases (Section 1 - No. 44)

In the provided example, what would be the correct SQL command to find records where SeatColour is 'Red' AND (White OR Silver)?
SELECT * FROM CAR WHERE SeatColour = 'Red' AND (White OR Silver);
SELECT * FROM CAR WHERE SeatColour = 'Red' AND (White = 'Y' OR Silver = 'Y');
SELECT * FROM CAR WHERE SeatColour = 'Red' OR White = 'Y' OR Silver = 'Y';
SELECT Code FROM CAR WHERE SeatColour = 'Red' AND ('White' OR 'Silver');

คำอธิบาย

Option 1 does not work as 'OR' does not work like that in SQL. Option 2 correctly uses the 'AND' operator to combine the conditions.

ความคิดเห็น (0)

เข้าสู่ระบบเพื่อแสดงความคิดเห็น
โฆษณา
BrainBehindX Inc Logo
©2026; ขับเคลื่อนโดย BrainBehindX Inc